<?php
$_code = $this->getMethodCode();
$accessCode = $this->getAccessCode();
?>

<form method="post" action="<?php echo Mage::getSingleton('core/session')->getFormActionUrl(); ?>"
      name="transparent_card" id="transparent_card">
    <h4><span class="please-wait" id="payment-please-wait" style="display: block;float: left;"><img
                src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif'); ?>" alt="Connecting..."
                title="Connecting..." class="v-middle"> Connecting...</span></h4>
    <input type="hidden" name="EWAY_ACCESSCODE" value="<?php echo $accessCode; ?>"/>

    <?php if ($this->transMethod == Eway_Rapid31_Model_Config::PAYPAL_STANDARD_METHOD || $this->transMethod == Eway_Rapid31_Model_Config::PAYPAL_EXPRESS_METHOD) { ?>
        <input type="hidden" name="EWAY_PAYMENTTYPE" value="paypal"/>
    <?php } elseif ($this->transMethod == Eway_Rapid31_Model_Config::MASTERPASS_METHOD) { ?>
        <input type="hidden" name="EWAY_PAYMENTTYPE" value="masterpass"/>
    <?php } ?>

    <?php if ($this->transMethod == Eway_Rapid31_Model_Config::PAYPAL_EXPRESS_METHOD) { ?>
        <input type="hidden" name="EWAY_NEWSHIPPINGTOTAL" value="<?php echo @$this->getNewShipping(); ?>"/>
        <input type="hidden" name="EWAY_ISREFERENCETRANSACTION" value="false"/>
    <?php } ?>
</form>

<script type="text/javascript">
    document.getElementById("transparent_card").submit();
</script>